from django.contrib import admin
from django.contrib import databrowse
from  models import *

class CityAdmin(admin.ModelAdmin):
    list_display = ('name', 'code')
    search_fields = ('name', 'code')
    save_as = True
    
class UserProfileAdmin(admin.ModelAdmin):
    list_display = ('user', 'city','image','credit','summary')    
    search_fields = ('summary', )

admin.site.register(Attachment)
admin.site.register(Tag)
admin.site.register(Audit)
admin.site.register(AppFeature)
admin.site.register(AppStar)
admin.site.register(DeviceStar)
admin.site.register(DeviceFeature)
admin.site.register(Link)
admin.site.register(App)
admin.site.register(Note)
admin.site.register(Photo)
admin.site.register(Video)
admin.site.register(Comment)
admin.site.register(UserProfile,UserProfileAdmin)
admin.site.register(Badge)
admin.site.register(Device)
admin.site.register(Group)
admin.site.register(Message)
admin.site.register(Topic)
admin.site.register(City,CityAdmin)




databrowse.site.register(App)
databrowse.site.register(Device)


